import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooWechatGraphicController } from '../../../controllers';
const uctoowechatGraphicRouter = new Router();
const wechatGraphicController = new uctooWechatGraphicController();

uctoowechatGraphicRouter.post('/add', requireUser, wechatGraphicController.add);
uctoowechatGraphicRouter.post('/edit', requireUser, rowLevelPermission('uctoo/wechat_graphic'), wechatGraphicController.edit);
uctoowechatGraphicRouter.post('/del', requireUser, rowLevelPermission('uctoo/wechat_graphic'), wechatGraphicController.delete);

//For getting wechatGraphic with permission control
uctoowechatGraphicRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/wechat_graphic'), wechatGraphicController.getSingle);
uctoowechatGraphicRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/wechat_graphic'), wechatGraphicController.getMany);
uctoowechatGraphicRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/wechat_graphic'), wechatGraphicController.getMany);

//#endregion AutoCreateCode
export default uctoowechatGraphicRouter;
